﻿<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>会员管理</title>
<link href="__PUBLIC__/admin/css/xc.min.css" rel="stylesheet" type="text/css" />
<link href="__PUBLIC__/admin/css/xc.admin.css" rel="stylesheet" type="text/css" />
<link href="__PUBLIC__/admin/css/page.css" rel="stylesheet" type="text/css" />
<link href="__PUBLIC__/lib/iconfont/iconfont.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="__PUBLIC__/admin/js/jquery.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/admin/js/xc.js"></script> 
<script type="text/javascript" src="__PUBLIC__/admin/js/xc.admin.js"></script>
<script type="text/javascript" src="__PUBLIC__/lib/layer/layer.js"></script>
<script type="text/javascript" src="__PUBLIC__/lib/My97DatePicker/WdatePicker.js"></script>
</head>
<body>
<nav class="breadcrumb mb10">
  <i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 会员管理 <span class="c-gray en">&gt;</span> 会员列表 
  <a class="btn btn-success radius r mr-20 btn-shua" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a>
</nav>

<div class="pd-20">
	<a class="btn btn-primary radius" onclick="layer_show('添加等级','__MODULE__/User/gradeAddEdit','600','')" href="javascript:;"><i class="Hui-iconfont">&#xe600;</i> 添加等级</a>
	<div class="mt-10">
		<table id="xctable" class="table table-border table-bordered table-hover table-bg table-sort">
			<thead>
			<tr class="text-c">
				<th width="20">编号</th>
				<th width="60" id="gr_name" onClick="tab_sort(this)"><div class="">等级名称</div></th>
				<th width="80" id="gr_money" onClick="tab_sort(this)"><div class="">报单金额</div></th>
				<th width="80" id="gr_frozen" onClick="tab_sort(this)"><div class="">静态积分</div></th>
				<th width="80" id="gr_order" onClick="tab_sort(this)"><div class="">消费一代释放比例</div></th>
				<th width="100" id="gr_order1" onClick="tab_sort(this)"><div class="">消费二代释放比例</div></th>
				<th width="100" id="gr_recom2" onClick="tab_sort(this)"><div class="">直推释放</div></th>
				<th width="60">操作</th>
			</tr>
			</thead>
			<volist name="list" id="vo" >
				<tr class="text-c">
					<td>{$vo.gr_id}</td>
					<td>{$vo.gr_name}</a></td>
					<td>{$vo.gr_money}</td>
					<td>{$vo.gr_frozen}</td>
					<td>{$vo.gr_order} %</td>
					<td>{$vo.gr_order1}%</td>
					<td>{$vo.gr_recom2}%</td>
					<td>
						<a href="javascript:;"style="text-decoration: none;" onclick="layer_show('修改等级','__MODULE__/User/gradeAddEdit/id/{$vo.gr_id}','600','')">编辑</a>
						<a style="text-decoration:none" href="javascript:;" onclick="del(this,'{$vo.gr_id}')"title="删除"><i class="Hui-iconfont">&#xe609;</i></a></td>
				</tr>
			</volist>
		</table>
	</div>
</div>
<script type="text/javascript">
	/*删除*/
	function del(obj, id) {
		layer.confirm('确认要删除吗？', function(index) {
			$.ajax({
				type : 'post',
				url : '__MODULE__/User/deaGrade',
				data : {id:id},
				dataType : 'json',
				success : function(res){
					if(res.status == 1){
						$(obj).parents("tr").remove();
						layer.msg('已删除!', {icon: 1,time: 1000});
					}else{
						layer.msg(res.msg, {icon: 2});
					}
				},
				error : function(XMLHttpRequest, textStatus, errorThrown) {
					layer.alert('网络失败，请刷新页面后重试',{icon:2});
				}
			})
		});
	}
</script>
</body>
</html>